import { _decorator, Component } from 'cc';
import { DataItemLayout } from '../../../Core/DataItemLayout';
const { ccclass, property } = _decorator;

/**
 * sy_kira
 * Mon May 20 2024 14:08:31 GMT+0800 (中国标准时间)
 */

@ccclass('MailBoxPanel')
export class MailBoxPanel extends Component {
    @property(DataItemLayout)
    layout : DataItemLayout;

    protected onLoad(): void {
        let datas:{title:string, body:string, items:{icon:number, quality:number, count:number}[]}[] = []

        datas.push({title:"第1封邮件", body:"邮件内容1", items:[{icon:0, quality:0, count:1}]});
        datas.push({title:"第2封邮件", body:"邮件内容2", items:[{icon:0, quality:0, count:1},{icon:1, quality:1, count:2}]});
        datas.push({title:"第3封邮件", body:"邮件内容3", items:[{icon:0, quality:0, count:1},{icon:1, quality:1, count:2},{icon:2, quality:2, count:3}]});
        datas.push({title:"第4封邮件", body:"邮件内容4", items:[{icon:0, quality:0, count:1},{icon:1, quality:1, count:2},{icon:2, quality:2, count:3},{icon:3, quality:3, count:4}]});
        datas.push({title:"第5封邮件", body:"邮件内容5", items:[{icon:0, quality:0, count:1},{icon:1, quality:1, count:2},{icon:2, quality:2, count:3},{icon:3, quality:3, count:4},{icon:4, quality:4, count:5}]});
        datas.push({title:"第6封邮件", body:"邮件内容6", items:[{icon:3, quality:1, count:10}]});
        datas.push({title:"第7封邮件", body:"邮件内容7", items:[{icon:2, quality:2, count:15}]});
        datas.push({title:"第8封邮件", body:"邮件内容8", items:[{icon:1, quality:3, count:20}]});
        

        this.layout.bindDatas(datas)
    }
}
